<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>行业信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }





		// //点击获取多选框checkbox选中事件
		// var s = $("input[name='breedLivestock']")
		// s.map(function(item,i){
		// 	$(this).click(function(){
		// 		var _this = this
		// 		$("#breedLivestock").click(function(){
		// 			if(_this.checked){
		// 				console.log($(_this).val())
		// 			}
		// 		})
		// 	})
		// })







	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/test2/farmClass/">行业信息列表</a></li>
		<shiro:hasPermission name="test2:farmClass:edit"><li><a href="${ctx}/test2/farmClass/form">行业信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="farmClass" action="${ctx}/test2/farmClass/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li style="width:18%"><label>养殖品种：</label>
				<input type="checkbox" id="breedLivestock" name="breedLivestock">猪 &nbsp;&nbsp;
				<input type="checkbox" name="breedLivestock">牛 &nbsp;&nbsp;
				<input type="checkbox" name="breedLivestock">羊 &nbsp;&nbsp;
<%--					<input type="checkbox" id="breedLivestock" name="breedLivestock"  ${farmClass.breedLivestock==0 ? 'checked':''}  value="0" >猪 &nbsp;&nbsp;--%>
<%--			 		<input type="checkbox" name="breedLivestock"  ${FarmClass.breedLivestock==1 ? 'checked':''}  value="1" >牛 &nbsp;&nbsp;--%>
<%--			 		<input type="checkbox" name="breedLivestock"  ${FarmClass.breedLivestock==2 ? 'checked':''}  value="2" >羊 &nbsp;&nbsp;--%>
			<li class="clearfix"></li>
			<li><label>养殖品种：</label>
				<form:input path="breedLivestock" htmlEscape="false" maxlength="80" class="input-medium"/>
			</li>

			<li class="btns" style="width:20%"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
		<th class="btbg font-center titfont" rowspan="2">序号</th>
		<th class="btbg font-center titfont" rowspan="2">养殖畜种</th>
		<th colspan="2" align="center" class="btbg font-center titfont">上一年规模(头、只、羽)</th>
		</tr>
		<tr>
		<th width="15%" class="btbg font-center">总存栏</th>
		<th width="15%" class="btbg font-center">能繁母畜存栏</th>
		<th width="15%" class="btbg font-center">出栏量</th>

		<th><a href="javascript:rowAdd()">新增商品</a></th>
<%--			<shiro:hasPermission name="test2:farmClass:edit"><th>操作</th></shiro:hasPermission>--%>
		</tr>

		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="farmClass" varStatus="vs" >
			<tr>
				<td>
				${vs.index+1}
				</td>
				<td>
					${farmClass.breedLivestock}
				</td>

				<td>
					${farmClass.totalInventory}
				</td>
				<td>
					${farmClass.breedingStock}
				</td>
				<td>
					${farmClass.quantityOfSlaughter}
				</td>

				<td><a href="javascript:;" onclick="rowDelete(this)">删除</a></td>
<%--				<shiro:hasPermission name="test2:farmClass:edit"><td>--%>
<%--    				<a href="${ctx}/test2/farmClass/form?id=${farmClass.id}">修改</a>--%>
<%--					<a href="${ctx}/test2/farmClass/delete?id=${farmClass.id}" onclick="return confirmx('确认要删除该行业信息吗？', this.href)">删除</a>--%>
<%--				</td></shiro:hasPermission>--%>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>